# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py3-pg_activity
_pkgname=pg_activity_fork
pkgver=1.5.0
pkgrel=2
pkgdesc="A top like application for PostgreSQL server activity monitoring."
url="https://github.com/julmon/pg_activity"
arch="noarch"
license="PostgreSQL"
depends="py3-psycopg2 py3-psutil"
makedepends="py3-setuptools"
source="$_pkgname-$pkgver.tar.gz::https://github.com/julmon/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces=py-pg_activity # Backwards compatibility
provides=py-pg_activity=$pkgver-r$pkgrel # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="3507320ea26764ae71ee4d51d77875c2ec063bd886f5064794567724c82b8e6b9f0eb8aae632e7a07d2346453d6ca760b0c9cdc49702765716ab42896000b70c  pg_activity_fork-1.5.0.tar.gz"
